using UnityEngine;
using System.Collections;

public class ButtonNextScene : MonoBehaviour {

    public string nextScene;
    void OnMouseDown()//only for PC tests
    {
        Application.LoadLevel("load" + nextScene);
    }
	
	//Limit the
    private float timer;
    void Update()
    {
        timer += Time.deltaTime;
        if (timer > 0.1f)
        {
            timer = 0;
            if (Input.touchCount > 0)
            {
                Touch touch = Input.GetTouch(0);
                if (guiTexture.HitTest(touch.position))
                {
                    Application.LoadLevel("load" + nextScene);
                }
            }
        }
    }
}
